<html>
<head><meta charset="utf-8"><title>rename all references · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rename.20all.20references.html">rename all references</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="196859046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rename%20all%20references/near/196859046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> zeroexcuses <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rename.20all.20references.html#196859046">(May 08 2020 at 05:23)</a>:</h4>
<p>suppose we have</p>
<div class="codehilite"><pre><span></span><code>fn foo(...)
</code></pre></div>


<p>is it possible in Code to rename <code>foo</code> to <code>bar</code>, and also have it change all references of <code>foo</code> to <code>bar</code> ? (this is different from a global sed because if a <code>bar</code> does not refer to this particular <code>foo</code>, we don't want to rename it)</p>



<a name="196859783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rename%20all%20references/near/196859783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rename.20all.20references.html#196859783">(May 08 2020 at 05:44)</a>:</h4>
<p>i think i remember there being a "rename symbol" ability?</p>



<a name="196862806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rename%20all%20references/near/196862806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rename.20all.20references.html#196862806">(May 08 2020 at 06:47)</a>:</h4>
<p>There is, press F2.</p>



<a name="196871815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rename%20all%20references/near/196871815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> zeroexcuses <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rename.20all.20references.html#196871815">(May 08 2020 at 08:58)</a>:</h4>
<p>I must be doing something wrong. I have tried F2, Ctrl-F2, ctrl-shift-p Refactor -- and in all cases, it's only renaming the one in the trait, but not the ones in the impl traits, or the actual calls</p>



<a name="196871828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rename%20all%20references/near/196871828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> zeroexcuses <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rename.20all.20references.html#196871828">(May 08 2020 at 08:58)</a>:</h4>
<p>Do I need something more than rust-analyzer ?</p>



<a name="196871909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rename%20all%20references/near/196871909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rename.20all.20references.html#196871909">(May 08 2020 at 08:59)</a>:</h4>
<p>You didn't mention traits :-). That's <a href="https://github.com/rust-analyzer/rust-analyzer/issues/4201" title="https://github.com/rust-analyzer/rust-analyzer/issues/4201">https://github.com/rust-analyzer/rust-analyzer/issues/4201</a>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>